<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="cutProcessDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='cutProcessDetail.heading'/>"/>
    <meta name="menu" content="RoleAdminCut"/>

</head>
<div id="help">
    <h2>
        <a href="<c:url value='helpAddCutDetailToCutProcess.html?decorate=false'/>"
           title="Help material purchase"
           onclick="Modalbox.show(this.href, {title: this.title, width: 600}); return false;">
               <fmt:message key="help"/>
        </a>
    </h2>
</div>
    <fieldset>
     <legend><fmt:message key="cutProcessForm.selectDatas"/></legend>

        <s:hidden name="cutProcess.id" value="%{cutProcess.id}"/>
        <table class="tableGrey" id="SelectedDatas">
            <thead>
                <tr>
                    <th class="hidden"/>
                    <th><fmt:message key="cutProcess.employee.fullName"/></th>
                    <th><fmt:message key="cutProcess.initDate"/></th>
                    <th class="hidden"/>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td> <s:property value="cutProcess.employee.fullName" /> </td>
                    <td> <s:property value="cutProcess.initDate" /> </td>
                </tr>
            </tbody>
        </table>
       <c:set var="buttons">
            <input type="button" style="margin-right: 5px"
                   onclick="location.href='<c:url value="/doneAddCutDetail.html"/>'"
                   value="<fmt:message key="button.done"/>"/>
            <input type="button" onclick="location.href='<c:url value="/genJasperReportCutDetailToCutProcess.html"/>'"
                   value="<fmt:message key="button.reportPDF"/>"/>
        </c:set>
        <c:out value="${buttons}" escapeXml="false" />

    </fieldset>

<div id="divCutDetails">

    <fieldset>

     <legend><fmt:message key="cutProcessForm.tableCutDetail"/></legend>
     <br/>
     <input type="button" style="margin-right: 5px"
                          onclick="location.href='<c:url value="/editCutDetail.html"/>'"
                          value="<fmt:message key="button.addCutDetail"/>"/>
     <br/>
     <br/>
     
     <display:table name="listCutDetails" cellspacing="0" cellpadding="0" requestURI="" list="listCutDetails_1"
               defaultsort="1" id="listCutDetails_1" pagesize="25" class="table" >
                <display:column sortable="false" titleKey="cutProcessForm.asignationDetail.editCutDetail" style="width: 10%"
                                media="html" href="editCutDetail.html" paramId="id" paramProperty="id">
                        <c:if test="${listCutDetails_1.modify }">
                            <img src="<c:url value="/images/edit.png" />" alt="Edit" />
                        </c:if>
                        <c:if test="${!listCutDetails_1.modify }">
                            <img src="<c:url value="/images/alert.gif" />" alt="Edit" />
                        </c:if>
                </display:column>
                <display:column sortable="false" titleKey="cutProcessForm.asignationDetail.re-asignCutDetail" style="width: 10%"
                                autolink="true" media="html" href="reasignCutDetail.html" paramId="id" paramProperty="id">
                        <c:if test="${listCutDetails_1.modify }">
                            <img src="<c:url value="/images/asc.gif" />" alt="Re-asign" />
                        </c:if>
                        <c:if test="${!listCutDetails_1.modify }">
                            <img src="<c:url value="/images/alert.gif" />" alt="Edit" />
                        </c:if>
                </display:column>
            <display:column property="pantDesign.model.datas" escapeXml="true" sortable="true" titleKey="cutProcessForm.asignationDetail.model" style="width: 20%"/>
            <display:column property="pantDesign.modelSize.valueSize" sortable="true" titleKey="cutProcessForm.asignationDetail.size" style="width: 10%" autolink="true" media="html"/>
            <display:column property="pantDesign.material.description" sortable="true" titleKey="cutProcessForm.asignationDetail.typeMaterial" style="width: 25%" autolink="true" media="html"/>
            
                <display:column sortable="false" titleKey="cutProcessForm.asignationDetail.deleteCutDetail" style="width: 10%"
                            autolink="true" media="html" href="deleteCutDetail.html" paramId="id" paramProperty="id">
                    <c:if test="${listCutDetails_1.modify }">
                        <img src="<c:url value="/images/trash.png" />" alt="Delete" />
                    </c:if>
                    <c:if test="${!listCutDetails_1.modify }">
                        <img src="<c:url value="/images/alert.gif" />" alt="Edit" />
                    </c:if>
                </display:column>
            
            <display:setProperty name="paging.banner.all_items_found" value=""/>
            <display:setProperty name="paging.banner.some_items_found" value=""/>
            <display:setProperty name="paging.banner.one_item_found" value=""/>
            <display:setProperty name="paging.banner.no_items_found" value=""/>

        </display:table>
     
    </fieldset>
    </div>

<script type="text/javascript">
    Form.focusFirstElement($("cutProcessForm"));
</script>
